/* General container styles */
.word_container {
    font-family: 'Poppins', sans-serif;
    max-width: 800px;
    margin: 50px auto 200px;
    padding: 20px;
    height: 600px;
    border-radius: 16px;
    background-color: #f7f7fb;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    color: #211f3f;
}
/* Tab navigation styles */
/* Tab navigation styles */
.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 30px;
    background: linear-gradient(90deg, #211f3f, #211f3f);
    border-radius: 25px;
    overflow: hidden;
    font-size: 14px;
    width: 250px;
    position: relative;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid black; /* 添加粗黑框 */
}

.tab-nav button {
    flex: 1;
    padding: 10px 4px;
    background: transparent;
    border: none;
    font-size: inherit;
    cursor: pointer;
    color: #fafafd;
    position: relative;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}

.tab-nav button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px; /* 将红点放在左边 */
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #ec1b64;
    border-radius: 50%;
    display: none;
    animation: pulse 1s infinite; /* 添加浮动效果 */
}

.tab-nav button.active {
    background: #fafafd;
    color: #211f3f;
    font-weight: bold;
    border-radius: 50px;
}

.tab-nav button.active::before {
    display: block;
}

/* 动画定义 */
@keyframes pulse {
    0%, 100% {
        transform: translateY(-50%) translateY(0);
    }
    50% {
        transform: translateY(-50%) translateY(-5px); /* 上下浮动效果 */
    }
}

/* Difficulty selector styles */
.difficulty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

.difficulty-selector label {
    font-size: 18px;
    font-weight: 600;
    margin-right: 10px;
    color: #555;
}

.difficulty-selector select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 0; /* 移除顶部边距 */
    background-color: #fff;
    color: #333;
    cursor: pointer;
    width: 12%;
    appearance: none;
    transition: border-color 0.3s ease;
}

.difficulty-selector select:focus {
    border-color: #817fec;
}
.word-text{
    margin-left: 300px;
    font-size: 20px;
}
.word-progress{
    margin-left: 300px;
}
/* Word display styles */
.word {
    text-align: center;
    margin-bottom: 20px;
}



.word-card {
    font-size: 28px;
    font-weight: 600;
    padding: 30px 40px;
    width: 70%;
    margin-left: 120px;
    border: 2px solid #e0dcdc;
    border-radius: 12px;
    background-color: #fafafd;
    color: #5a5a5a;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.word-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(26, 26, 27, 0.1);
    background-color: #eaeaf6;
}

.chinese-meaning {
    margin-top: 12px;
    margin-left: 260px;
    font-size: 18px;
    color: #777;
}
.reviewtext{
    margin-left: 280px;
}

/* Alert styles */
.alert-container {
    margin-top: 20px;
    padding: 12px;
    background-color: #ffecb3;
    border-radius: 8px;
    color: #333;
    font-size: 16px;
    text-align: center;
}

/* Button group styles */
.button-group {
    display: flex;
    justify-content: center; /* 将按钮居中 */
    align-items: center;
    flex-wrap: wrap; /* 允许按钮换行 */
    margin-top: 20px;
}

.button-group button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    margin: 8px;
    color: #e9e4f4;
    cursor: pointer;
    background: #343351;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.button-group button:hover {
    color: #200e67;
    transform: translateY(-3px);
    background: #e0d9f1;
}

.remember-button {
    padding: 12px 24px;
    margin-left: 330px;
    margin-top: 30px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    color: #e9e4f4;
    cursor: pointer;
    background: #343351;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.remember-button:hover {
    color: #200e67;
    transform: translateY(-3px);
    background: #e0d9f1;
}



.next-button {
    background-color: #5f8a8b;
    color: white;
}

.next-button:hover {
    background-color: #4c7472;
}



/* Modal styles */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    width: 320px;
    padding: 20px;
    z-index: 1000;
}

.modal h2 {
    margin-top: 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.modal ul {
    list-style-type: none;
    padding: 0;
    margin: 15px 0;
    height: 200px;  /* Fixed height */
    overflow-y: auto;  /* Enable vertical scroll */
    border: 1px solid #ddd;
    border-radius: 8px;
}

.modal li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #444;
}

.modal button {
    margin-top: 12px;
    padding: 10px 16px;
    background-color: #5f8a8b;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.modal button:hover {
    background-color: #4c7472;
    transform: translateY(-3px);
}


.error-words-button {
    position: absolute;
    top: 17px;
    right: 5px;
    background: #f0f0f0;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.5; /* 默认情况下设置为半透明 */
    transition: opacity 0.3s ease; /* 添加过渡效果 */
}

.error-words-button:hover {
    opacity: 1; /* 鼠标悬停时显示实体 */
}

.error-words-list {
    position: absolute;
    color: #211f3f;
    top: 90px;
    margin-top: 5px;
    text-align: center;
    right: 10px;
    width: 300px;
    max-height: 400px; /* 固定最大高度 */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px; /* 圆角调整 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 更柔和的阴影效果 */
    padding: 10px;
    z-index: 1000;
}

/* 滚动条样式（适用于大多数现代浏览器） */
.error-words-list::-webkit-scrollbar {
    width: 8px; /* 滚动条宽度 */
}

.error-words-list::-webkit-scrollbar-thumb {
    background: #ccc; /* 滚动条颜色 */
    border-radius: 4px; /* 滚动条圆角 */
}

.error-words-list::-webkit-scrollbar-thumb:hover {
    background: #aaa; /* 滚动条悬停颜色 */
}

.error-words-list::-webkit-scrollbar-track {
    background: #f5f5f5; /* 滚动条轨道颜色 */
}

.error-words-scrollable {
    max-height: 330px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 5px;
}

.error-word {
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.error-word:last-child {
    border-bottom: none;
}

.remove-error-word-button {
    background-color: #d5c6f4;
    color: #2000c1;
    font-weight: 700;
    border: none;
    border-radius: 11px;
    padding: 8px 14px;
    margin-left: 90px;
    cursor: pointer;
    opacity: 0.6;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    width: 80px;  /* 固定宽度 */
    height: 30px;  /* 固定高度 */
    box-sizing: border-box;  /* 确保内边距和边框包含在宽高中 */
    display: flex;  /* 使用 Flexbox 来居中文本 */
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    text-align: center;      /* 确保文本居中 */
    white-space: nowrap;     /* 防止文本换行 */
    font-family: 'Arial', sans-serif; /* 统一字体 */
    font-size: 14px;         /* 统一字体大小 */
    line-height: 1.2;        /* 统一线高 */
}
.remove-error-word-button:hover {
    background-color: #624de3;
    color: #e2ddf3;
    transform: translateY(-3px);
    opacity: 1; /* 鼠标悬停时恢复全透明度 */
}
.no-review-words-warning{
    margin-left: 80px;
    font-size: 50px;
}

/* styles.css */
/* 按钮样式 */
.save-progress-button {
    /* 按钮尺寸 */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* 背景渐变色，增加视觉层次感 */
    background: #f7f7fb;
    /* 设置柔和的阴影 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 80px;
    right: 15px;
    opacity: 0.6;
    font-size: 16px;
    z-index: 1000;
    font-weight: 600;
}

/* 悬停时效果 */
.save-progress-button:hover {
    background-color: #ddd3ff;  /* 更鲜亮的背景色 */
    opacity: 1;
    transform: scale(1.1) rotate(15deg);  /* 增加旋转和缩放 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 提示文字样式 */
.save-progress-button span {
    position: absolute;
    left: -110px;  /* 提示文字偏移按钮的距离 */
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, left 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 500;
    background: #343351;
    color: #e9e4f4;
    padding: 5px 10px;
    border-radius: 5px;
}

/* 悬停时文字显示 */
.save-progress-button:hover span {
    opacity: 1;
    left: -120px;  /* 微调文字显示的距离 */
    transform: translateY(-50%) scale(1.05);  /* 文字放大效果 */
}

/* 按钮点击时的轻微缩放反馈 */
.save-progress-button:active {
    transform: scale(1.05); /* 点击时缩放 */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2); /* 按钮点击反馈 */
}